package com.xyzwps.server.paimon.it

import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.boot.test.web.server.LocalServerPort

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class GqlHelloTests(@LocalServerPort port: Int) : GqlTestBase(port) {

    @Test
    fun testHello() {
        graphQlTester.document("{ hello { message time phone } } ")
            .execute()
            .path("hello")
            .entity(Map::class.java)
            .satisfies {
                assertEquals("14200000001", it["phone"])
                assertEquals("Hello, world.", it["message"])
            }
    }
}
